Filter

Filter takes a predicate p and a list xs, and returns a list containing only those elements of xs that satisfy p. For example,

#math150#
Filter~(Lessthan~1)~[1, 2, 3] = #tex2html_wrap_indisplay2606# : #tex2html_wrap_indisplay2607#Foldr#tex2html_wrap_indisplay2608#@<8<#5#><896>><#891#>#tex2html_wrap_indisplay2609##tex2html_wrap_indisplay2610#! :}#tex2html_wrap_indisplay2611#1 ;SPMlt; < <349>>[1, 2, 3]  

Filter can be defined as a Foldr:
#math151#
Filter~p = Foldr~(Lift~p~Cons~Second )~Nil  

Another easy bit of TEX: